package ch02;

import java.awt.Rectangle;

public class FourRectanglePrinter {

	
	private static void printBox(Rectangle someBox){
		System.out.println("The box is located at x:" + someBox.x + " y:" + someBox.y);
	}
	
	public static void main(String[] args) {
		int boxX = 10;
		int boxY = 10;
		int boxSize = 100;
		Rectangle box = new Rectangle(boxX, boxY, boxSize, boxSize);
		printBox(box);
		
		int i = 3;
		while (i > 0)
		{
			box.translate(boxSize, 0);
			printBox(box);
			i--;
		}

	}

}
